<?php

if ((!defined('NV_SYSTEM')) AND (!defined('NV_ADMIN'))) {
    Header("Location: ../index.php");
    exit;
}

global $datafold, $sitekey, $gfx_chk;
if (file_exists("".INCLUDE_PATH."".$datafold."/config_Your_Account.php")) {
	include ("".INCLUDE_PATH."".$datafold."/config_Your_Account.php");
}

$re = $_SERVER['QUERY_STRING'];
if($re=="") {
	$re2 = "index.php";
} else {
	$re2 = "modules.php?".$re."";
}
if(!defined('IS_USER')) {
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$random_num = mt_rand(0, $maxran);
$content = "";
$content .= "\n<script>\n";
		$content .= "function Ulog(Forma) {\n";
		$content .= "if (Forma.username.value == \"\") {\n";
		$content .= "alert(\""._NICKNAME." ?\");\n";
		$content .= "Forma.username.focus();\n";
		$content .= "return false;\n";
		$content .= "}\n";
		$content .= "dc = Forma.username.value.length;\n";
		$content .= "if(dc < ".$nick_min."){\n";
		$content .= "alert(\""._NICKADJECTIVE."1\");\n";
		$content .= "Forma.username.focus();\n";
		$content .= "return false;\n";
		$content .= "}\n";
		$content .= "if(dc > ".$nick_max."){\n";
		$content .= "alert(\""._NICK2LONG."2\");\n";
		$content .= "Forma.username.focus();\n";
		$content .= "return false;\n";
		$content .= "}\n";
		if (extension_loaded("gd") AND ($gfx_chk == 2 OR $gfx_chk == 4 OR $gfx_chk == 5 OR $gfx_chk == 7)) {
		$content .= "if (Forma.gfx_check.value == \"\") {\n";
		$content .= "alert(\""._SECURITYCODE." ?\");\n";
		$content .= "Forma.gfx_check.focus();\n";
		$content .= "return false;\n";
		$content .= "}\n";
		}
		$content .= "if (Forma.user_password.value == \"\") {\n";
		$content .= "alert(\""._PASSWORD." ?\");\n";
		$content .= "Forma.user_password.focus();\n";
		$content .= "return false;\n";
		$content .= "}\n";
		$content .= "if (Forma.user_password.value == \"\") {\n";
		$content .= "alert(\""._PASSWORD." ?\");\n";
		$content .= "Forma.user_password.focus();\n";
		$content .= "return false;\n";
		$content .= "}\n";
		$content .= "if (Forma.user_password.value != \"\") {\n";
		$content .= "dp = Forma.user_password.value.length;\n";
		$content .= "if(dp < ".$pass_min."){\n";
		$content .= "alert(\""._PASSLENGTH1.". "._YOUPASSMUSTBE." ".$pass_min." "._YOUPASSMUSTBE2." ".$pass_max." "._YOUPASSMUSTBE3."\");\n";
		$content .= "Forma.user_password.focus();\n";
		$content .= "return false;\n";
		$content .= "}\n";
		$content .= "if(dc > ".$pass_max."){\n";
		$content .= "alert(\""._PASSLENGTH.". "._YOUPASSMUSTBE." ".$pass_min." "._YOUPASSMUSTBE2." ".$pass_max." "._YOUPASSMUSTBE3."\");\n";
		$content .= "Forma.user_password.focus();\n";
		$content .= "return false;\n";
		$content .= "}\n";
		$content .= "}\n";
		$content .= "return true; \n";
		$content .= "}\n";
		$content .= "</script>\n";
$content .= "<form onsubmit=\"return Ulog(this)\" action=\"".INCLUDE_PATH."modules.php?name=Your_Account\" method=\"post\">";
$content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"1\">";
$content .= "<tr><td><font class=\"content\">"._NICKNAME."</td><td>";
$content .= "<input type=\"text\" name=\"username\" size=\"11\" maxlength=\"$nick_max\"></td></tr>";
$content .= "<tr><td>"._PASSWORD."</td><td>";
$content .= "<input type=\"password\" name=\"user_password\" size=\"11\" maxlength=\"$pass_max\"></td></tr>";
if (extension_loaded("gd") AND ($gfx_chk == 2 OR $gfx_chk == 4 OR $gfx_chk == 5 OR $gfx_chk == 7)) {
    $content .= "<tr><td>"._SECURITYCODE."</td><td><img width=\"73\" height=\"17\" src='?gfx=gfx&amp;random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'></td></tr>\n";
    $content .= "<tr><td>"._TYPESECCODE."</td><td><input type=\"text\" NAME=\"gfx_check\" SIZE=\"11\" MAXLENGTH=\"6\"></td></tr>\n";
    $content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">\n";
} else {
    $content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">";
    $content .= "<input type=\"hidden\" name=\"gfx_check\" value=\"$code\">";
}
$content .= "<tr><td colspan=2>"._REMEMBER." <input type=\"checkbox\" name=\"remember\" value=\"1\"> <input type=\"submit\" value=\">>>\"></td></tr>";
$content .= "<input type=\"hidden\" name=\"nvforw\" value=\"$re2\">";
$content .= "<input type=\"hidden\" name=\"op\" value=\"login\">";
$content .= "</td></tr></table></font><center></form>";
} else {
	$content = "<center><form action=\"".INCLUDE_PATH."modules.php?name=Your_Account\" method=\"post\">";
	$content .= "<input type=\"hidden\" name=\"nvforw\" value=\"$re2\">";
	$content .= "<input type=\"hidden\" name=\"op\" value=\"logout\">";
	$content .= "<input type=\"submit\" value=\""._LOGOUT."\">";
	$content .= "</form></center>";
}
?>
